/*
 * XML Type:  XSizer
 * Namespace: http://www.seedwill.com/xul/core
 * Java type: com.seedwill.xul.core.XSizer
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.core.impl;
/**
 * An XML XSizer(@http://www.seedwill.com/xul/core).
 *
 * This is a complex type.
 */
public class XSizerImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.seedwill.xul.core.XSizer
{
    private static final long serialVersionUID = 1L;
    
    public XSizerImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SIZETYPE$0 = 
        new javax.xml.namespace.QName("", "sizeType");
    private static final javax.xml.namespace.QName VALUE$2 = 
        new javax.xml.namespace.QName("", "value");
    
    
    /**
     * Gets the "sizeType" element
     */
    public com.seedwill.xul.core.XSizeType.Enum getSizeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SIZETYPE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (com.seedwill.xul.core.XSizeType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "sizeType" element
     */
    public com.seedwill.xul.core.XSizeType xgetSizeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSizeType target = null;
            target = (com.seedwill.xul.core.XSizeType)get_store().find_element_user(SIZETYPE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "sizeType" element
     */
    public void setSizeType(com.seedwill.xul.core.XSizeType.Enum sizeType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SIZETYPE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SIZETYPE$0);
            }
            target.setEnumValue(sizeType);
        }
    }
    
    /**
     * Sets (as xml) the "sizeType" element
     */
    public void xsetSizeType(com.seedwill.xul.core.XSizeType sizeType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSizeType target = null;
            target = (com.seedwill.xul.core.XSizeType)get_store().find_element_user(SIZETYPE$0, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XSizeType)get_store().add_element_user(SIZETYPE$0);
            }
            target.set(sizeType);
        }
    }
    
    /**
     * Gets the "value" element
     */
    public float getValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(VALUE$2, 0);
            if (target == null)
            {
                return 0.0f;
            }
            return target.getFloatValue();
        }
    }
    
    /**
     * Gets (as xml) the "value" element
     */
    public org.apache.xmlbeans.XmlFloat xgetValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(VALUE$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "value" element
     */
    public void setValue(float value)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(VALUE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(VALUE$2);
            }
            target.setFloatValue(value);
        }
    }
    
    /**
     * Sets (as xml) the "value" element
     */
    public void xsetValue(org.apache.xmlbeans.XmlFloat value)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlFloat target = null;
            target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(VALUE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(VALUE$2);
            }
            target.set(value);
        }
    }
}
